<form id="pagerForm" method="post" action="<?php echo site_url('index.php?m=cate');?>">
	<input type="hidden" name="pageNum" value="1" />
	<input type="hidden" name="numPerPage" value="<?php echo $list['pager']->per_page;?>" />
    <input type="hidden" name="cate_name" value="<?php echo $_input->post('cate_name');?>" />
    <input type="hidden" name="action" value="<?php echo $_input->post('action');?>" />
</form>


<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="<?php echo site_url('index.php?m=cate');?>" method="post">
	<div class="searchBar">
		<table class="searchContent">
			<tr>
				<td>
					分类名：<input type="text" name="cate_name" value="<?php echo $_input->post('cate_name');?>"/>
				</td>
				<td>
					资源：<input type="text" name="action" value="<?php echo $_input->post('action');?>"/>
				</td>
                <td><div class="button"><div class="buttonContent"><button type="submit">检索</button></div></div></td>
			</tr>
		</table>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="<?php echo site_url('index.php?m=cate&a=add');?>" target="dialog" height="400" rel="add_cate"><span>添加</span></a></li>
            <li class="line">line</li>
			<li><a class="delete" href="<?php echo site_url('index.php?m=cate&a=del');?>&cate_id={sid}" target="ajaxTodo" title="确定要删除吗?"><span>删除</span></a></li>
            <li class="line">line</li>
			<li><a class="edit" href="<?php echo site_url('index.php?m=cate&a=edit');?>&cate_id={sid}" target="dialog" height="400"><span>修改</span></a></li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="112">
		<thead>
			<tr>
				<th width="30" align="center">ID</th>
				<th width="180" align="center">分类名称</th>
				<th width="80">资源</th>
                <th width="50" align="center">是否显示</th>
                <th width="50" align="center">是否外链</th>
                <!--<th width="50" align="center">左值</th>
                <th width="50" align="center">右值</th>-->
                <th width="50" align="center">父类ID</th>
                <th width="50" align="center">操作</th>
			</tr>
		</thead>
		<tbody>
            <?php foreach($list['rs'] as $v){?>
            <tr target="sid" rel="<?php echo $v['cate_id'];?>">
                <td><?php echo $v['cate_id'];?></td>
                <td><?php echo $v['cate_name'];?></td>
                <td><?php echo $v['action'];?></td>
                <td><?php echo $v['is_show'] ? '<span style="color:green;">是</span>':'<span style="color:red">否</span>';?></td>
                <td><?php echo $v['type'] ? '<span style="color:green;">是</span>':'<span style="color:red">否</span>';?></td>
               <!-- <td><?php echo $v['left_value'];?></td>
                <td><?php echo $v['right_value'];?></td>-->
                <td><?php echo $v['parent_cate_id'];?></td>
                <td><a href="<?php echo site_url('index.php?m=cate&a=edit');?>&cate_id=<?php echo $v['cate_id'];?>" target="dialog" height="400" rel="edit_cate">编辑</a> | <a href="<?php echo site_url('index.php?m=cate&a=del');?>&cate_id=<?php echo $v['cate_id'];?>" target="ajaxTodo" title="确定要删除吗?">删除</a></td>
            </tr>
            <?php }?>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
            <?php
                $_pager_num_type = array(30,50,100);
            ?>
			<select class="combox" name="numPerPage" change="navTabPageBreak" param="numPerPage">
                <?php
                    foreach($_pager_num_type as $v){
                        echo '<option value="'.$v.'" '.($list['pager']->per_page == $v ? 'selected':'').'>'.$v.'</option>';
                    }
                ?>
			</select>
			<span>条，共<?php echo $list['pager']->getTotalCount();?>条</span>
		</div>
		
		<div class="pagination" targetType="navTab" totalCount="<?php echo $list['pager']->getTotalCount();?>" numPerPage="<?php echo $list['pager']->per_page;?>" pageNumShown="5" currentPage="<?php echo $list['pager']->curr_page;?>"></div>

	</div>
</div>
